//轮播
var mySwiper = new Swiper ('.swiper-container', {
    loop: true, // 循环模式选项
    autoplay: {
     delay:5000,
     stopOnLastSlide: false,
     disableOnInteraction: true,
     },
    // 如果需要分页器
    pagination: {
        el: '.swiper-pagination',
        clickable: true,
        clickableClass : 'my-pagination-clickable',
    },

    // 如果需要前进后退按钮
    navigation: {
        nextEl: '.swiper-button-next',
        prevEl: '.swiper-button-prev',
    },
});


//隐藏，显示
var yic=document.querySelector("#yic");
var Totop=document.querySelector("#Totop");
window.onscroll=function(){
    if (document.documentElement.scrollTop>300||document.body.scrollTop>300){
        yic.style.display="block";
    } else {
        yic.style.display="none";
    }

    if (document.documentElement.scrollTop>1000||document.body.scrollTop>1000){
        Totop.style.display="block";
    } else {
        Totop.style.display="none";
    }
};

Totop.addEventListener('click',function(){
    window.scrollTo(0,0);
    //window.scrollTo({
    //    top:0,
    //    behavior:'smooth'
    //})
});


var yiru=document.querySelector("#yiru");
var yichu=document.querySelector("#yichu");
yiru.addEventListener("mouseover",function(){
    yichu.style.display="block";
});
yiru.addEventListener("mouseleave",function(){
    yichu.style.display="none";
});
yichu.addEventListener("mouseover",function(){
    yichu.style.display="block";
});
yichu.addEventListener("mouseleave",function(){
    yichu.style.display="none";
});


var yiru1=document.querySelector("#yiru1");
var yichu1=document.querySelector("#yichu1");
yiru1.addEventListener("mouseover",function(){
    yichu1.style.display="block";
});
yiru1.addEventListener("mouseleave",function(){
    yichu1.style.display="none";
});
yichu1.addEventListener("mouseover",function(){
    yichu1.style.display="block";
});
yichu1.addEventListener("mouseleave",function(){
    yichu1.style.display="none";
});